package com.zk.springcloud.web;

import com.zk.springcloud.client.ProviderClient;
import com.zk.springcloud.config.SystemConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RefreshScope
public class ConsumerController {

    @Autowired
    private ProviderClient providerClient;

    @Autowired
   private SystemConfig systemConfig;

    @Value("${configValue}")
    private String configValue;


    @GetMapping("/hi-feign")
    public String hiFeign() {
        return providerClient.hi("feign");
    }

    @GetMapping("/config")
    public String config() {
        return configValue ;
    }



}


